<%--
 *  File:    ControlGLAccountBaseEdit.jsp
 *  @Author: Stephen Liu
 *  Date:    Friday, January 30, 2004

 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType ="text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  Category cat = Category.getInstance("jsp.ControlGLAccountBaseEdit");
  String strModuleName = "GL";
  String privilegeCode = "40109";
%>

<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/SessionTimeout.inc" %>
<%@ include file="/inc/Security.inc" %>

<html>
<head>
<title>controlglaccountbaseedit</title>
<PageFlow:CheckPageFlow pageName="controlglaccountinfoview"/>
<%
  HashMap glaccountinfo = (HashMap) pageContext.getAttribute("glaccountinfo");
  if (glaccountinfo == null)
    glaccountinfo = new HashMap();

  if (glaccountinfo.get("entitytype") != null && glaccountinfo.get("entitytype").toString().equals("1"))
    pageContext.setAttribute("glaccountlistid", glaccountinfo.get("entityid"));
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../css/<%= strLanguageCode %>/script.js"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="javascript:set_contentleft_height1(420)">
<form name="frm" method="post" action="../Dispatcher">
  <custom:hidden name="glaccountinfo" property="glaccountid"/>
  <custom:hidden property="glaccountlistid"/>

  <table id="topTable" border=0 cellpadding=0 cellspacing=0 width="100%">
    <tr>
      <td valign=top>
        <table border=0 cellpadding=1 cellspacing=0 width="100%">
          <tbody>
          <tr>
            <td bgcolor=#000000 style="PADDING-BOTTOM: 1px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; PADDING-TOP: 0px">
              <table bgcolor=#000000 border=0 cellpadding=0 cellspacing=0 width="100%">
                <tr>
                  <td bgcolor=#ffffff style="PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; PADDING-TOP: 3px">
                   <div id=div2 style="HEIGHT: 245px; OVERFLOW: auto">
                      <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
                        <tr>
                          <td width="110" class="td-text" height="20" align="right"><%= label.getLabelName("L_DCFlag") + label.getLabelName("L_Colon") %></td>
                          <td width="300" colspan="4">
                          <%
                            String dcflag = (String) glaccountinfo.get("dcflag");
                            if ("1".equals(dcflag))
                              out.print(label.getLabelName("L_DebitFactor"));
                            else if ("2".equals(dcflag))
                              out.print(label.getLabelName("L_CreditFactor"));
                          %>&nbsp;
                          </td>
                          <td class="td-text" width="110"><%= label.getLabelName("L_ReferExchangeAccount") + label.getLabelName("L_Colon") %></td>
                          <td>
                            <custom:write name="glaccountinfo" property="referexchangeaccountcode" nbsp="true"/>
                          </td>
                        </tr>
                        <tr>
                          <td class="td-text" height="20" align="right"><%= label.getLabelName("L_GLAccountAttribute") + label.getLabelName("L_Colon") %></td>
                          <td colspan="4">
                            <custom:write name="glaccountinfo" property="glaccountclassname" nbsp="true"/>
                          </td>
                          <td class="td-text"><%= label.getLabelName("L_ProfitAndLossType") + label.getLabelName("L_Colon") %></td>
                          <td>
                            <custom:write name="glaccountinfo" property="profitandlosstypename" nbsp="true"/>
                          </td>
                        </tr>
                        <tr>
                          <td class="td-text" height="20" align="right"><%= label.getLabelName("L_LedgerFlag") + label.getLabelName("L_Colon") %></td>
                          <td colspan="4">
                            <custom:checkbox name="glaccountinfo" property="ledgerflag" checkFlag="1/0" style="border:0" disabled="true"/>
                          </td>
                          <td class="td-text" align="right"><%= label.getLabelName("L_LedgerType") + label.getLabelName("L_Colon") %></td>
                          <td>
                            <custom:write name="glaccountinfo" property="ledgertypename" nbsp="true"/>
                          </td>
                        </tr>
                        <tr>
                          <td class="td-text" height="20"><%= label.getLabelName("L_TaxRelatedFlag") + label.getLabelName("L_Colon") %></td>
                          <td colspan="4">
                            <custom:checkbox name="glaccountinfo" property="taxrelatedflag" checkFlag="1/0" style="border:0" disabled="true"/>
                          </td>
                          <td class="td-text"><%= label.getLabelName("L_TaxType") + label.getLabelName("L_Colon") %></td>
                          <td>
                            <custom:write name="glaccountinfo" property="taxtypename" nbsp="true"/>
                          </td>
                        </tr>
                        <tr>
                          <td class="td-text" height="20" align="right"><%= label.getLabelName("L_GLAssItemFlag") + label.getLabelName("L_Colon") %></td>
                          <td colspan="4">
                            <custom:checkbox name="glaccountinfo" property="glassitemflag" checkFlag="1/0" style="border:0" disabled="true"/>
                          </td>
                          <td class="td-text"><%= label.getLabelName("L_DefaultAssistantItem") + label.getLabelName("L_Colon") %></td>
                          <td>
                            <custom:write name="glaccountinfo" property="assistantitemname" nbsp="true"/>
                          </td>
                        </tr>
                        <tr>
                          <td class="td-text" height="20" align="right"><%= label.getLabelName("L_CashflowItemFlag") + label.getLabelName("L_Colon") %></td>
                          <td colspan="4">
                           <custom:checkbox name="glaccountinfo" property="cashflowitemflag" checkFlag="1/0" style="border:0"  disabled="true"/>
                          </td>
                          <td class="td-text">&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td class="td-text" height="20"><%= label.getLabelName("L_CreateSubAccountFlag") + label.getLabelName("L_Colon") %></td>
                         <td colspan="4">
                            <custom:checkbox name="glaccountinfo" property="createsubaccountflag" checkFlag="1/0" style="border:0" disabled="true"/>
                          </td>
                          <td class="td-text"><%= label.getLabelName("L_COPAssignFlag") + label.getLabelName("L_Colon") %></td>
                          <td>
                            <custom:checkbox name="glaccountinfo" property="copassignflag" checkFlag="1/0" style="border:0" disabled="true"/>
                          </td>
                        </tr>
                        <tr>
                          <%
                            Object foreigncurrencyflag = glaccountinfo.get("foreigncurrencyflag");
                            String flag0 = "";
                            String flag1 = "";
                            if ("0".equals(foreigncurrencyflag))
                              flag0 = "checked";
                            else if ("1".equals(foreigncurrencyflag))
                              flag1 = "checked";

                            Object currencytype = glaccountinfo.get("currencytype");
                            String type1 = "";
                            String type2 = "";
                            if (currencytype != null && currencytype.toString().equals("1"))
                              type1 = "checked";
                            else if (currencytype != null && currencytype.toString().equals("2"))
                              type2 = "checked";
                          %>
                          <td class="td-text" rowspan="3"><%= label.getLabelName("L_CurrencyAttribute") + label.getLabelName("L_Colon") %></td>
                          <td rowspan="2" width="10">
                            <input type="radio" name="foreigncurrencyflag" id="foreigncurrencyflag0" value="0" disabled class="normalradio" <%=JspHelper.filterNull( flag0 )%>>
                          </td>
                          <td rowspan="2" width="110"><%= label.getLabelName("L_LocalCurrency") + label.getLabelName("L_GLAccount") %></td>
                          <td width="10">
                            <input type="radio" name="currencytype" id="currencytype1" value="1" class="normalradio" disabled <%=JspHelper.filterNull( type1 )%>>
                          </td>
                          <td width="126"><%= label.getLabelName("L_SingleLocalCurrency") %></td>
                          <td width="110">&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td>
                            <input type="radio" name="currencytype" id="currencytype2" value="2" class="normalradio" disabled <%=JspHelper.filterNull( type2 )%>>
                          </td>
                          <td><%= label.getLabelName("L_MultiForeignCurrency") %></td>
                          <td align="right"><%= label.getLabelName("L_CommonForeCurrency") + label.getLabelName("L_Colon") %></td>
                          <td>
                            <% if (flag0.equals("checked") && type2.equals("checked")) { %>
                            <custom:write name="glaccountinfo" property="forecurrencyname" nbsp="true"/>
                            <% } %>&nbsp;
                          </td>
                        </tr>
                        <tr>
                          <td>
                            <input type="radio" name="foreigncurrencyflag" id="foreigncurrencyflag1" value="1" class="normalradio" disabled <%=JspHelper.filterNull( flag1 )%>>
                          </td>
                          <td><%= label.getLabelName("L_ForeignCurrency") + label.getLabelName("L_GLAccount") %></td>
                          <td>&nbsp;</td>
                          <td><%= label.getLabelName("L_SingleForeignCurrency") %></td>
                          <td align="right">
                            <%= label.getLabelName("L_CurrencyType") + label.getLabelName("L_Colon") %></td>
                          <td>
                            <% if (flag1.equals("checked")) { %>
                            <custom:write name="glaccountinfo" property="forecurrencyname" nbsp="true"/>
                            <% } %>&nbsp;
                          </td>
                        </tr>
                      </table>
                    </div>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          </tbody>
        </table>
      </td>
    </tr>
    <tr>
      <td class=summary_top></td>
    </tr>
    <tr>
      <%@ include file="ControlGLAccountInfoBtn.inc" %>
    </tr>
  </table>
</form>
</body>
</html>
